import request from "@/utils/http";
export const addAddressAPI = (data) => {
  return request({ url: "/member/address", method: "post", data });
};

export const getAddressAPI = () => {
  return request({ url: "/member/address" });
};

export const getAddressDetailAPI = (id) => {
  return request({ url: "/member/address/" + id });
};

export const updateAddressAPI = (id, data) => {
  return request({ url: `/member/address/${id}`, data, method: "put" });
};

// 1. API
export const delAddressAPI = (id) => {
  return request({ url: "/member/address/" + id, method: "delete" });
};
